﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RangeCollider : MonoBehaviour {
    public static RangeCollider instance;
    public bool haveCollider;
    // Use this for initialization
    void Awake () {
        instance = this;
        haveCollider = false;
	}
	
	// Update is called once per frame
	void Update () {
	}
    
    void OnCollisionStay(Collision collision)
    {
        //进入碰撞器执行的代码
        if (collision.transform.tag == "Building")
        {
            haveCollider = true;
            //Debug.Log(haveCollider);
        }
    }
    void OnCollisionExit(Collision collision)
    {
        //进入碰撞器执行的代码
        haveCollider = false;
        //Debug.Log(haveCollider);
    }
}
